Skip to content

frontend: ClusterTable/ResourceTable: Lift up tableSettings helpers and add localStorage to ClusterTable#4712

Open
StevenPG wants to merge 1 commit intokubernetes-sigs:mainfrom
StevenPG:frontend-cluster-table-local-storage
Open

frontend: ClusterTable/ResourceTable: Lift up tableSettings helpers and add localStorage to ClusterTable#4712
StevenPG wants to merge 1 commit intokubernetes-sigs:mainfrom
StevenPG:frontend-cluster-table-local-storage

Conversation

@StevenPG
Copy link

Summary

This PR fixes #4711 by persisting column visibility, sorting, and column filter settings on the home page's ClusterTable to localStorage, so users' table customizations survive page navigations and browser refreshes.

Related Issue

Fixes #4711

Changes

  • Lifted tableSettings from ResourceTable.tsx into a shared helper
  • Updated ResourceTable.tsx to use new shared helper
  • Updated ClusterTable.tsx by adding columnIds and localStorage persistence for visibility, sorting and filters
  • Added shared helper tests in tableSettings.test.ts

Steps to Test

  1. Update a filter in the cluster table
  2. Select and open a cluster.
  3. Navigate around the cluster for any length of time
  4. Click Home in the top left
  5. Review that the filter is still present in the table
  6. Update the columns by toggling Origin and Warnings invisible (for example)
  7. Select and open a cluster
  8. Navigate around the cluster for any length of time
  9. Click Home in the top left
  10. Review that the column that were toggled invisible are still not present

Screenshots (if applicable)

easy-to-read-cluster-edited

Notes for the Reviewer

Before this changed, if you set filters or column settings, when you enter and then leave a cluster, the cluster table is reset.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 15, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: StevenPG / name: Steven Gantz (f674dc5)

@k8s-ci-robot
Copy link
Contributor

Welcome @StevenPG!

It looks like this is your first PR to kubernetes-sigs/headlamp 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/headlamp has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: StevenPG
Once this PR has been reviewed and has the lgtm label, please assign yolossn for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cluster Table does not store table settings between page reloads

2 participants